<style scoped lang="less">
</style>
<template>
  <div>
    <s-nav :navbtnData="navbtnData" :modalCon="modalCon"></s-nav>
    <s-search :searchData="searchData"></s-search>
    <s-table :tableHeader="tableHeader" :tableBody="tableBody"></s-table>
  </div>
</template>
<script>
import sNav from '../components/nav.vue'
import sSearch from '../components/search.vue'
import sTable from '../components/table.vue'
export default {
  components: {
    sNav,
    sSearch,
    sTable
  },
  data () {
    return {
      navbtnData: [{id: 1, name: '新增', modalCon: false},{id: 2, name: '编辑', modalCon: false},{id: 3, name: '推广', modalCon: false, disable: false},{id: 4, name: '白名单', modalCon: false, disable: true}],
      modalCon: [{id: 1, modalCon: false, title: '标题'},{id: 2, name: '编辑', modalCon: false},{id: 3, name: '推广', modalCon: false, disable: false},{id: 4, name: '白名单', modalCon: false, disable: true}],
      searchData: [
        {
          id: 1,
          label: '姓名',
          type: 'input',
          placeholder: '请输入姓名',
          value: ''
        },
        {
          id: 2,
          label: '昵称',
          type: 'input',
          placeholder: '请输入昵称',
          value: 'haha'
        },
        {
          id: 3,
          label: '输入',
          type: 'input',
          value: 'haha'
        },
        {
          id: 4,
          label: '年龄',
          type: 'select',
          optionList: [{value: '1', option: '1'}, {value: '2', option: '2'}, {value: '3', option: '3'}, {value: '4', option: '4'}, {value: '5', option: '5'}],
          value: []
        },
        {
          id: 5,
          label: '学校',
          type: 'select2',
          optionList: [
            {value: '1', option: '省份1', subOption: [{value: '11', option: '学校11'}, {value: '12', option: '学校12'}, {value: '13', option: '学校13'}]},
            {value: '2', option: '省份2', subOption: [{value: '21', option: '学校21'}, {value: '22', option: '学校22'}, {value: '23', option: '学校23'}]},
            {value: '3', option: '省份3', subOption: [{value: '31', option: '学校31'}, {value: '32', option: '学校32'}, {value: '33', option: '学校33'}]},
            {value: '4', option: '省份4', subOption: [{value: '41', option: '学校41'}, {value: '42', option: '学校42'}, {value: '43', option: '学校43'}]},
            {value: '5', option: '省份5', subOption: [{value: '51', option: '学校51'}, {value: '52', option: '学校52'}, {value: '53', option: '学校53'}]}
          ],
          optionList2: [{value: '1', option: '1'}, {value: '2', option: '2'}, {value: '3', option: '3'}, {value: '4', option: '4'}, {value: '5', option: '5'}],
          value: [],
          value2: []
        },
        {
          id: 6,
          label: '注册时间',
          type: 'date',
          optionList: [{value: '1', option: '1'}, {value: '2', option: '2'}, {value: '3', option: '3'}, {value: '4', option: '4'}, {value: '5', option: '5'}],
          value: []
        },
        {
          id: 7,
          label: '在校时间',
          type: 'daterange',
          optionList: [{value: '1', option: '1'}, {value: '2', option: '2'}, {value: '3', option: '3'}, {value: '4', option: '4'}, {value: '5', option: '5'}],
          value: []
        },
        {
          id: 8,
          label: '时间段',
          type: 'datetimerange',
          optionList: [{value: '1', option: '1'}, {value: '2', option: '2'}, {value: '3', option: '3'}, {value: '4', option: '4'}, {value: '5', option: '5'}],
          value: []
        }
      ],
      tableHeader: [
        {
          width: 60,
          align: 'center',
          type: 'index'
        },
        {
          title: 'Name',
          key: 'name'
        },
        {
          title: 'Age',
          key: 'age'
        },
        {
          title: 'Address',
          key: 'address'
        }
      ],
      tableBody: [
        {
          name: 'John Brown',
          age: 18,
          address: 'New York No. 1 Lake Park',
          date: '2016-10-03'
        },
        {
          name: 'Jim Green',
          age: 24,
          address: 'London No. 1 Lake Park',
          date: '2016-10-01'
        },
        {
          name: 'Joe Black',
          age: 30,
          address: 'Sydney No. 1 Lake Park',
          date: '2016-10-02'
        },
        {
          name: 'Jon Snow',
          age: 26,
          address: 'Ottawa No. 2 Lake Park',
          date: '2016-10-04'
        },
        {
          name: 'John Brown',
          age: 18,
          address: 'New York No. 1 Lake Park',
          date: '2016-10-03'
        },
        {
          name: 'Jim Green',
          age: 24,
          address: 'London No. 1 Lake Park',
          date: '2016-10-01'
        },
        {
          name: 'Joe Black',
          age: 30,
          address: 'Sydney No. 1 Lake Park',
          date: '2016-10-02'
        },
        {
          name: 'Jon Snow',
          age: 26,
          address: 'Ottawa No. 2 Lake Park',
          date: '2016-10-04'
        },
        {
          name: 'John Brown',
          age: 18,
          address: 'New York No. 1 Lake Park',
          date: '2016-10-03'
        },
        {
          name: 'Jim Green',
          age: 24,
          address: 'London No. 1 Lake Park',
          date: '2016-10-01'
        },
        {
          name: 'Joe Black',
          age: 30,
          address: 'Sydney No. 1 Lake Park',
          date: '2016-10-02'
        },
        {
          name: 'Jon Snow',
          age: 26,
          address: 'Ottawa No. 2 Lake Park',
          date: '2016-10-04'
        },
        {
          name: 'John Brown',
          age: 18,
          address: 'New York No. 1 Lake Park',
          date: '2016-10-03'
        },
        {
          name: 'Jim Green',
          age: 24,
          address: 'London No. 1 Lake Park',
          date: '2016-10-01'
        },
        {
          name: 'Joe Black',
          age: 30,
          address: 'Sydney No. 1 Lake Park',
          date: '2016-10-02'
        },
        {
          name: 'Jon Snow',
          age: 26,
          address: 'Ottawa No. 2 Lake Park',
          date: '2016-10-04'
        }
      ]
    }
  }
}
</script>